package com.stars.home.adapter;

import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder;
import com.stars.home.R;
import com.stars.home.databinding.ItemAreaselectBinding;
import com.stars.home.model.AreaBean;
import com.stars.home.vmodel.AreaSelectVModel;
import com.trailer.base.base.BAdapter;

import org.jetbrains.annotations.NotNull;

public class AreaSelectAdapter extends BAdapter<AreaBean, BaseDataBindingHolder<ItemAreaselectBinding>> {

    private AreaSelectVModel vm;

    public AreaSelectAdapter(AreaSelectVModel vm) {
        super(R.layout.item_areaselect, null);
        this.vm = vm;
    }

    @Override
    protected void convert(@NotNull BaseDataBindingHolder<ItemAreaselectBinding> helper, AreaBean todo) {
        ItemAreaselectBinding binding = helper.getDataBinding();
        binding.setItem(todo);
        binding.setVm(vm);

    }
}
